aklına esmek aklından geçirmek

  1. Verb to come into one's head to happen to think (of)